package cn.coufran.springboot.starter.log.serializer;

/**
 * toString()序列化器
 * @author Coufran
 * @version 1.0.0
 * @since 1.0.0
 */
public class ToStringSerializer implements Serializer {
    /**
     * 调用toString()序列化对象为字符串，null对象将被序列化为null
     * @param obj 对象
     * @return 字符串
     */
    @Override
    public String serialize(Object obj) {
        return String.valueOf(obj);
    }
}
